import { MsgEnum } from '@/enums';
import { MSG_REPLY_TEXT_MAP } from '@/constant/message';

// 计算展示的回复消息的内容
const renderReplyContent = (type?: MsgEnum, content?: string) => {
    switch (type) {
      case MsgEnum.SYSTEM:
      case MsgEnum.TEXT: {
        return `${content}`
      }
      case MsgEnum.IMAGE: {
        return `${MSG_REPLY_TEXT_MAP[MsgEnum.IMAGE]}`
      }
      case MsgEnum.FILE: {
        return `${MSG_REPLY_TEXT_MAP[MsgEnum.FILE]}`
      }
      case MsgEnum.VOICE: {
        return `${MSG_REPLY_TEXT_MAP[MsgEnum.VOICE]}`
      }
      case MsgEnum.VIDEO: {
        return `${MSG_REPLY_TEXT_MAP[MsgEnum.VIDEO]}`
      }
      case MsgEnum.EMOJI: {
        return `${MSG_REPLY_TEXT_MAP[MsgEnum.EMOJI]}`
      }
      default: {
        return ''
      }
    }
  }
  export default renderReplyContent